<!DOCTYPE html>
<html>

<head>
    <title>经济文明App-首页</title>
    <meta charset="utf-8" />
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">
    <link rel="shortcut icon" href="./static/img/favicon.ico" type="image/x-icon">
    <meta name="viewport" content="user-scalable=no, width=device-width,height=device-height initial-scale=1.0" />
    <script src="/static/js/jquery.js"></script>
    <script src="/static/js/bootstrap.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
        
            console.log("welcome:"+localStorage.getItem("user"))

        });
        function logout(){
            window.localStorage.removeItem("user");
            window.location.href="./login.html";
        }

        function goto(id){
            switch (id) {
                case "btnChat":
                window.location.href="https://chat.2020cn.cn";
                    break;
                case "btnGame":
                window.location.href="https://game.2020cn.cn";
                break;
                case "btnMail":
                window.location.href="https://box.newciviliz.me/mail";
                break;
                case "btnMy":
                //检查是否登录
                var user = localStorage.getItem("user");
                if(user == null){
                    var ret = confirm("您未登录，是否前往登录页?");
                    if(ret == true){
                        window.location.href="https://2020cn.cn/login.html";
                    }
                }else{
                    window.location.href="https://2020cn.cn/my.html";
                }
                break;
                default:
                    break;
            }
        }
    </script>
    <style type="text/css">
       
        html {
            height: 100%;
            padding: 0;
            margin: 0px;
        }

        body {
            height: 100%;
            text-align: center;
            padding: 0;
            margin: 0px;
            overflow: hidden;
        }
    

#imgBg {
    width: 150%;
    height: 100%;
    z-index: -2;
    position: absolute;
    top: 0%;
    left: -25%;
}

#imgBgCircleBottom {
    width: 150%;
    height: 100%;
    z-index: -1;
    position: absolute;
    bottom: -67%;
    left: -25%;
}
#imgBgCircleTop {
    width: 150%;
    height: 100%;
    z-index: -1;
    position: absolute;
    top: -77%;
    left: -25%;
}
        #logoutBtn {
            border-color: #b1b2b5;
            position: absolute;
            left: 3.14159%;
            top: 3.14159%;
            border-radius: 50%;
            width: 13vw;
            height: 13vw;
            font-size: 3vw;
        }

       
          
        .btn{
            border-color: #b1b2b5;
            border-radius: 50%;
            width: 21vmin;
            height: 21vmin;
            font-size: 2vmin;
        }
        .container{
            margin-top: 33%;
        }

    </style>
</head>

<body>
   
        <img id="imgBg" src="./static/img/CircleBg-1CirCle.svg" /> 
        <img id="imgBgCircleBottom" src="./static/img/CircleBg-15orangeCircle.svg" />
        <img id="imgBgCircleTop" src="./static/img/CircleBg-15orangeCircle.svg" />
    

    <div class="container" id="btnsDiv">
        <button id="logoutBtn" onclick="logout()">退出</button>
        <div class="centerBtns" id="btnsCenter">
            <button class="btn" id="btnNotice" onclick="">公告</button>
            <button class="btn" id="btnCore" onclick="">宗旨</button>
            <button class="btn" id="btnChat" onclick="goto(id)">聊天</button>
            <br>
            <button class="btn" id="btnMail" onclick="goto(id)">邮箱</button>
            <button class="btn" id="btnMy" onclick="goto(id)">我的</button>
            <button class="btn" id="btnGame" onclick="goto(id)">游戏</button>
            <br>
            <button class="btn" id="btnSale" onclick="">拍卖</button>
            <button class="btn" id="btnShotcut" onclick="">添加到桌面</button>
            <button class="btn" id="btnMsg" onclick="">留言</button>
        </div>
       
    </div>


    <br>
    <br>
</body>

</html>